This module provides security testing tools and configurations for the BitVelocity platform.
bv-security-testing/
├── zap/ # OWASP ZAP configurations
├── dependency-check/ # OWASP Dependency Check configs
├── penetration-tests/ # Manual penetration test scenarios
├── security-gates/ # CI/CD security gate scripts
└── reports/ # Security scan reports
- Tool: SonarQube / SpotBugs
- What: Analyzes source code for security vulnerabilities
- When: Every commit in CI pipeline
- Checks: SQL injection, XSS, hardcoded secrets, insecure crypto
- Tool: OWASP Dependency Check, Snyk
- What: Scans dependencies for known CVEs
- When: Every build, weekly scheduled scan
- Action: Fail build on HIGH/CRITICAL CVEs
- Tool: Trivy, Grype
- What: Scans container images for vulnerabilities
- When: Before image push, in CI pipeline
- Checks: Base image vulnerabilities, package CVEs
- Tool: OWASP ZAP
- What: Tests running application for vulnerabilities
- When: Nightly in staging environment
- Checks: SQL injection, XSS, CSRF, broken auth
- Tool: TruffleHog, GitGuardian
- What: Detects secrets in code and git history
- When: Pre-commit hook, CI pipeline
- Checks: API keys, passwords, tokens, certificates
cd bv-security-testing/zap
docker run -v $(pwd):/zap/wrk/:rw \
-t owasp/zap2docker-stable zap-baseline.py \
-t http://localhost:8080 \
-c api-scan-config.yaml \
-r zap-report.htmlcd bv-core-parent
./mvnw org.owasp:dependency-check-maven:checktrivy image --severity HIGH,CRITICAL bitvelocity/order-service:latesttrufflehog git file://. --only-verifiedSecurity gates automatically enforce security standards:
- Pre-commit: Secrets scanning
- PR: SAST, dependency check
- Merge to main: Container scan, contract tests
- Deploy to staging: DAST scan
- Before production: Manual security review
| Severity | Action | Timeline |
|---|---|---|
| CRITICAL | Block deployment, immediate fix | < 24 hours |
| HIGH | Create issue, fix in next sprint | < 1 week |
| MEDIUM | Create issue, prioritize backlog | < 1 month |
| LOW | Document, fix opportunistically | Best effort |
For false positives or accepted risks:
<!-- dependency-check/suppression.xml -->
<suppress>
<notes>False positive - not used in production</notes>
<cve>CVE-2021-12345</cve>
</suppress>See penetration-tests/ for manual test scenarios:
- SQL Injection attempts
- Authentication bypass tests
- Authorization boundary tests
- CSRF token validation
- Rate limiting tests
- Input validation fuzzing
Each domain should have a security champion responsible for:
- Reviewing security scan results
- Triaging vulnerabilities
- Implementing security best practices
- Staying updated on security advisories